<!DOCTYPE html>
<html>
<#include "../head.html">
<body class="full">
	<div class="mc">
		<div>
			<div class="mc-l">
				<!--左侧导航---{-->
				<div id="navPanelContainer">
					<div class="system-logo cd"></div>
					<!--管理员信息---{-->
					<#include "../adminInfo.html">
					<!--管理员信息---}-->
					<div class="nav-wrap"><#include "left.html"></div>
				</div> <!--左侧导航---}-->
			</div>
			<div class="mc-m">
				<div class="navToggle"></div>
			</div>
			<div class="mc-r">
				<!--顶部导航---{--> <#include "../topNav.html"> <!--顶部导航---}--> <!--面包屑导航---{-->
				<#assign moduleName="银行卡信息"> <#include "banner.html"> <!--面包屑导航---}-->
				<!--工具栏--{-->
				<div id="toolbar" class="clearfix">
				<div class="toolbor-module export">
                                    <input type="button" onclick="exportxls()" value="导出列表" class="input-button export-btn"/>
                                </div>
					<form action="" method="post">
						<div class="toolbor-module search">
							<div class="formTit">增加日期：</div>
                		<input class="_search-value" name="startDate" id="startDate" value="" onclick="change_picktime()"/>
                		<div class="formTit"> 到 </div>
                		<input class="_search-value" name="endDate" id="endDate" value="" id="" onclick="change_picktime()"/>
            			
			              							
							<div class="formTit">用户名：</div>
							<input type="text" name="userName" id="userName" value="请输入用户名"
								class="search-value">
							<div class="formTit">手机：</div>
							<input type="text" name="phone" id="phone" value="请输入手机号"
								class="search-value">
							<div class="formTit">身份证号：</div>
							<input type="text" name="cardId" id="cardId" value="请输入身份证号"
								class="search-value">
							<div class="formTit">银行卡号：</div>
							<input type="text" name="bankCardNo" id="bankCardNo"
								value="请输入银行卡号" class="search-value"> <input
								type="button" value="搜索" class="input-button"
								onclick="sousuo();">
						</div>
					</form>
				</div> <!--工具栏--}-->

				<div id="main" class="clearfix">
					<#if bankInfoList??>
					<table class="data-list">

						<tr class="header">
							<td>用户名</td>
							<td>手机号码</td>
							<td>卡归属银行</td>
							<td>开户行</td>
							<td>卡号</td>
							<td>操作</td>
							<td>日期</td>
						</tr>
						<#list bankInfoList as obj>
						<tr class="s">
							<td>${obj.user.showName!"-"}</td>
							<td>${obj.user.phone!"-"}</td>
							<td>${obj.bankShortName!"-"}</td>
							<td>${obj.brabankName!"-"}</td>
							<td>${obj.hiddenCardNo!"-"}</td>
							<td>
								<dd><a onclick='alertPop("银行卡信息","url:get?viewBankcardInfo.html?bankCardId=${obj.id?c}",550,600,"true","","true","text");'
							href="javascript:void(0)">查看</a></dd>
								<#if obj.isUse==1&&obj.status==1>
									<dd><a onclick='alertPop("验证信息","url:get?bankcardUnbund.html?bankCardId=${obj.id?c}&userName=${search_userName}&phone=${search_phone}&cardId=${search_cardId}&bankCardNo=${search_bankCardNo}",550,400,"true","","true","");' href="javascript:void(0)">解绑</a></dd>
								<#else>
									未绑定
								</#if>
								<#if obj.isUse==1&&obj.status==1&&isRecived.get("${obj_index}")=="1">
									<dd><a onclick='alertPop("更换银行卡","url:get?changeBankcardInfo.html?bankCardId=${obj.id?c}&userName=${search_userName}&phone=${search_phone}&cardId=${search_cardId}&bankCardNo=${search_bankCardNo}",1200,800,"true","","true","");' href="javascript:void(0)">更换</a></dd>
								</#if>
							</td>
							<td>${obj.addTime!"-"}</td>
						</tr>
						
						</#list>
					</table>

					<#else>暂无</#if>


					<!--底部工具栏--{-->
					<div id="bottomToolbar" class="clearfix">
						<div class="other-tool">
							<dl class="refresh-data">
								<dt class="refresh-data-icon"></dt>
								<dd>
									<a href="javascript:void(0);" class="refresh-page">刷新数据</a>
								</dd>
							</dl>
						</div>

						<!--翻页系统--{-->
						<div class="container s_formPage"><#import "../../common/page.html" as
							pager> <@pager.pagination page=page
							url="/admin/bankcard/bankcardInfoList.html" map=params
							style="style1" /></div>
						<!--翻页系统--}-->
					</div>
					<!--底部工具栏--}-->
					
				</div>

			</div>
		</div>
		<div>
			<!--尾部--{-->
			<td colspan="3" class="mc-b"><#include "../foot.html"></td>
			<!--尾部--}-->
		</div>
	</div>

	<script type="text/javascript">
		var sosoUrl = 'bankcardInfoList.html?search=true';
		function sousuo() {
			var sou = "";
			var userName = $("#userName").val();
			if (userName != "" && userName != "请输入用户名") {
				sou += "&userName=" + userName;
			}
			var phone = $("#phone").val();
			if (phone != "" && phone != "请输入手机号") {
				sou += "&phone=" + phone;
			}
			var cardId = $("#cardId").val();
			if (cardId != "" && cardId != "请输入身份证号") {
				sou += "&cardId=" + cardId;
			}
			var bankCardNo = $("#bankCardNo").val();
			if (bankCardNo != "" && bankCardNo != "请输入银行卡号") {
				sou += "&bankCardNo=" + bankCardNo;
			}
			var startDate = $("#startDate").val();
         	var endDate = $("#endDate").val();
          if (startDate!=null){
              sou += "&startDate="+startDate;
          }
          if (endDate!=null){
              sou += "&endDate="+endDate;
          }
			
			if (sou != "") {
				location.href = sosoUrl + sou;
			}
		}
		
		 var xlsurl = 'bankcardInfoList.html?type=export';
			function exportxls(){
                             var sou = "";
                             var username = $("#userName").val();
                             if (username!=""&&username!="请输入用户名"){
                                 sou += "&username="+username;
                             }
                             var email = $("#cardId").val();
         					if(email!=""&&email!="请输入身份证号"){
         						sou += "&cardId="+email;
         					}
         					var phone = $("#phone").val();
         					if(phone!=""&&phone!="请输入手机号"){
         						sou += "&phone="+phone;
         					}
         					var realname = $("#bankCardNo").val();
         					if(realname!=""&&realname!="请输入银行卡号"){
         						sou += "&bankCardNo="+realname;
         					}
         					 var startDate = $("#startDate").val();
                             	var endDate = $("#endDate").val();
                              if (startDate!=null){
                                  sou += "&startDate="+startDate;
                              }
                              if (endDate!=null){
                                  sou += "&endDate="+endDate;
                              }
                             if (sou!=""){
                                 location.href=xlsurl+sou;
                             }else{
                                 location.href=xlsurl;
                             }
                         }
		function change_picktime(date){
			if (date){
			WdatePicker({dateFmt:''+date+''});
			}else{
				WdatePicker();
			}
	}	
	</script>
</body>
</html>
<#include "../jsPage.html">
